package com.eternal.permission.dao;

import com.eternal.permission.entity.PermissionInfo;
import com.eternal.permission.entity.RolePermission;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.eternal.permission.vo.RoleVo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 角色权限表 Mapper 接口
 * </p>
 *
 * @author Eternal
 * @since 2018-08-26
 */
@Mapper
public interface RolePermissionMapper extends BaseMapper<RolePermission> {

    /**
     * 查询角色的详细信息
     * @param roleId
     * @return
     */
    List<PermissionInfo> selectPermissionByRoleId(String roleId);

    List<String> selectPermissionByRoleIdStr(String roleId);


    Set<PermissionInfo> selectPermissionByRoleIds(List<String> roleIds);

    boolean insertBatch(List<RolePermission> rolePermissions);
}
